import 'package:dio/dio.dart';
import 'package:p_location/common/res/common_res.dart';
import 'package:p_location/net/net_listener.dart';

class NetListenerImpl implements NetListener {
  final Function onSuccess;
  final Function onError;

  NetListenerImpl(this.onSuccess, this.onError);

  @override
  void onRequestSuccess(Response response) {
    onSuccess(response);
  }

  @override
  void onRequestError(CommonRes errorRes) {
    onError(errorRes);
  }
}
